package com.chenbei.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "配置实体类")
@Data
@TableName("sys_config")
public class SysConfig extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键ID")
    private Long id;

    @NotBlank(message = "配置名称不能为空")
    @Schema(description = "配置名称")
    private String name;

    @NotBlank(message = "配置键名不能为空")
    @Schema(description = "配置键名")
    @TableField("key_name")
    private String keyName;

    @Schema(description = "配置键值")
    private String content;

    @Schema(description = "是否内置[0:否|1:是]")
    @NotNull(message = "状态不能为空")
    @TableField("status")
    private Integer status;

    @Schema(description = "备注")
    private String remark;
}
